//
//  ChaXunViewController.m
//  Hero
//
//  Created by lanou3g on 16/5/7.
//  Copyright © 2016年 刘永庆. All rights reserved.
//

#import "ChaXunViewController.h"
#import "MeDetailViewController.h"
#import "HeroShujuTableViewController.h"
#import "DuanWeiViewController.h"
@interface ChaXunViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *imageView1;


@end

@implementation ChaXunViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view sendSubviewToBack:self.imageView1];
    self.navigationItem.title = @"查询页面";
    self.navigationController.navigationBar.backgroundColor = [UIColor redColor];
    
}
- (IBAction)didClickCancleAction:(UIButton *)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)didClickChaXunAction:(id)sender {
    if (self.index == 0) {
        MeDetailViewController *detail = [MeDetailViewController new];
        detail.qu = self.daquName.text;
        detail.name = self.naem.text;
        [self.navigationController pushViewController:detail animated:YES];
    }
    if (self.index == 1) {
        HeroShujuTableViewController *heroVC = [HeroShujuTableViewController new];
        heroVC.name = self.naem.text;
        heroVC.daqu = self.daquName.text;
        [self.navigationController pushViewController:heroVC animated:YES];
    }
    if (self.index == 2) {
        DuanWeiViewController *dunweiVC = [ DuanWeiViewController new];
        dunweiVC.qu = self.daquName.text;
        dunweiVC.name = self.naem.text;
        [self.navigationController pushViewController:dunweiVC animated:YES];
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
